package com.d2.modules.system.category.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.d2.modules.system.category.entity.Category;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface ICategoryService extends IService<Category> {
    List<Category> tree(Long id);

    List<Category> children(Long id);

    @Transactional(rollbackFor = Exception.class)
    Category delById(Long id);

    void deleteById(Long id);

    void updateHasChildren(Long pid);
}
